
// B. Herbomez 2011

#include "TxtTraductor.h"

using namespace std;

TxtTraductor::TxtTraductor(Robot *r):Traductor(r){
	
}
		
void TxtTraductor::launch(){
	ifstream file("instr", ios::in);  //open, reading mode
 
	if(file){ //file opened
			int code;
			long value;
			while(file.eof()){
				file >> code >> value;//read a line
				this->perform(code, value);
			}
			file.close();
	}
	else
		cerr << "Unable to read the file" << endl;
}
